package BLL.AdminSys;

import BIZ.statementofncomeBiz;
import javabean.statementOfIncome;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;

@WebServlet(name = "AdminSelect", value = "/AdminSelect")
public class AdminSelect extends HttpServlet {
    private static final long serialVersionUID = 1L;

    public AdminSelect() {
        super();
    }

    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setContentType("text/html;charset=UTF-8");
        HttpSession session = request.getSession();

        //得到整个表单
        statementofncomeBiz statementofncomeBiz=new statementofncomeBiz();
        List<statementOfIncome> aa = statementofncomeBiz.getAllState();

        //将整个表单传递给前端
        //json?
        PrintWriter out = response.getWriter();
        out.println(""+aa);

    }

    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doGet(request, response);
    }

}
